/*
 * @Author: tangyongxin 1463148307@qq.com
 * @Date: 2024-02-21 17:37:30
 * @LastEditors: tangyongxin 1463148307@qq.com
 * @LastEditTime: 2024-03-28 02:48:47
 * @FilePath: \patrol_front\src\api\work\repair.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 查询报修工单信息列表
export function listRepair(query) {
  return request({
    url: '/work/repair/list',
    method: 'get',
    params: query
  })
}

// 查询报修工单信息详细
export function getRepair(id) {
  return request({
    url: '/work/repair/' + id,
    method: 'get'
  })
}

// 新增报修工单信息
export function addRepair(data) {
  return request({
    url: '/work/repair',
    method: 'post',
    data: data
  })
}

// 修改报修工单信息
export function updateRepair(data) {
  return request({
    url: '/work/repair',
    method: 'put',
    data: data
  })
}

// 修改巡检工单状态
export function repairUpdateStatus(data) {
  return request({
    url: '/work/repair/updateStatus',
    method: 'put',
    data: data
  })
}

// 删除报修工单信息
export function delRepair(id) {
  return request({
    url: '/work/repair/' + id,
    method: 'delete'
  })
}
